//
//  UIButton+Extesion.swift
//  weibo
//
//  Created by Amisear on 15/9/21.
//  Copyright © 2015年 Amisear. All rights reserved.
//

import UIKit


extension UIButton {
    
    convenience init(imageName:String ,backgrouundName:String) {
        self.init()
        
        
        setImage(UIImage(named: imageName), forState: UIControlState.Normal)
        setImage(UIImage(named:imageName + "_highlighted"), forState: UIControlState.Highlighted)
        setBackgroundImage(UIImage(named:backgrouundName), forState: UIControlState.Normal)
        setBackgroundImage(UIImage(named:backgrouundName + "_highlighted"), forState: UIControlState.Highlighted)
        
        sizeToFit()
    }
    
}


